package com.example.yang.mvp.p;

import com.example.yang.mvp.Bean;
import com.example.yang.mvp.m.M2;
import com.example.yang.mvp.v.ViewMain;


import java.util.List;


public class P1 implements P2,M2.FinMain{

    ViewMain viewMain;
    M2 m2;




    public P1(ViewMain viewMain, M2 m2) {
        this.viewMain = viewMain;
        this.m2=m2;
    }





    @Override
    public void showList(List<Bean.RESULTBean.NewsListBean> newelist) {

        if (viewMain!=null){
            viewMain.ShowList(newelist);
        }
    }

    @Override
    public void setPage(int page) {
        if (m2!=null){
            m2.getData(page,this);
        }
    }
}
